:root {
  --primary-color: #4a6fa5;
  --secondary-color: #6b8cbc;
  --accent-color: #ff7e5f;
  --light-color: #f5f7fa;
  --dark-color: #2c3e50;
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f0f2f5;
  color: var(--dark-color);
  line-height: 1.6;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  transition: width var(--transition-speed) ease;
  overflow: hidden;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 100;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.logo i {
  margin-right: 10px;
  font-size: 1.8rem;
}

.toggle-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform var(--transition-speed) ease;
}

.sidebar.collapsed .toggle-btn {
  transform: rotate(180deg);
}

.sidebar.collapsed .logo-text {
  display: none;
}

.sidebar-menu {
  padding: 20px 0;
}

.menu-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu-item i {
  margin-right: 15px;
  font-size: 1.2rem;
  min-width: 20px;
  text-align: center;
}

.menu-text {
  white-space: nowrap;
  overflow: hidden;
}

.sidebar.collapsed .menu-text {
  display: none;
}

/* 主内容区样式 */
.main-content {
  flex: 1;
  padding: 20px;
  transition: margin-left var(--transition-speed) ease;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.page-title {
  font-size: 1.8rem;
  color: var(--dark-color);
  margin-bottom: 10px;
}

.page-description {
  color: #666;
}

/* 卡片样式 */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
  padding: 15px 20px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  background: var(--light-color);
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
}

.btn {
  padding: 8px 15px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn:hover {
  background: var(--secondary-color);
}

/* 侧边栏卡片样式 */
.sidebar-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin: 15px;
  padding: 15px;
  color: white;
}

.sidebar-card h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.sidebar-card p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
  }

  .sidebar.collapsed {
    width: 100%;
    height: 60px;
  }

  .sidebar.collapsed .sidebar-menu,
  .sidebar.collapsed .sidebar-card {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }
}
